package io;


import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;

public class ReadStringDemo {
    public static void main(String[] args) throws IOException {

        File file = new File("./src/main/java/io/ReadStringDemo.java");
        FileInputStream fil = new FileInputStream(file);
        byte[] by = new byte[(int)file.length()];
        fil.read(by);
        fil.close();
        String s = new String(by, StandardCharsets.UTF_8);
        System.out.println(s);
    }
}
